﻿// <copyright file="DataSetElement.cs" company="Todd Aspeotis">
//  Copyright © 2011 Todd Aspeotis
// </copyright>

namespace LocalReportsEngine.ReportDefinitionElements
{
    using System.Collections.Generic;
    using System.Xml.Linq;
    using System.Xml.Serialization;

    /// <summary>
    /// Provides a representation of the DataSet element.
    /// </summary>
    public class DataSetElement
    {
        /// <summary>
        /// Prevents a default instance of the DataSetElement class from being created.
        /// </summary>
        private DataSetElement()
        {
        }

        /// <summary>
        /// Gets the name of the report definition element this class represents.
        /// </summary>
        public static string ElementName
        {
            get { return "DataSet"; }
        }

        /// <summary>
        /// Gets or sets the value of AccentSensitivity child element.
        /// </summary>
        public string AccentSensitivity { get; set; }

        /// <summary>
        /// Gets or sets the value of the CaseSensitivity child element.
        /// </summary>
        public string CaseSensitivity { get; set; }

        /// <summary>
        /// Gets or sets the value of the Collation child element.
        /// </summary>
        public string Collation { get; set; }

        /// <summary>
        /// Gets or sets the collection of Field child elements.
        /// </summary>
        [XmlArray("Fields")]
        [XmlArrayItem("Field")]
        public List<FieldElement> Fields { get; set; }

        /// <summary>
        /// Gets or sets the collection of Filter child elements.
        /// </summary>
        [XmlArray("Filters")]
        [XmlArrayItem("Filter")]
        public List<FilterElement> Filters { get; set; }

        /// <summary>
        /// Gets or sets the value of the KanatypeSensitivity child element.
        /// </summary>
        public string KanatypeSensitivity { get; set; }

        /// <summary>
        /// Gets or sets the value of the Name attribute.
        /// </summary>
        [XmlAttribute("Name")]
        public string Name { get; set; }
        
        /// <summary>
        /// Gets or sets the Query child element.
        /// </summary>
        public QueryElement Query { get; set; }

        /// <summary>
        /// Gets or sets the value of the WidthSensititivy child element.
        /// </summary>
        public string WidthSensitivity { get; set; }
    }
}
